﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_PRODUCT_TECHNIC_ITEM
// * CreateDate    : 2013-02-20 19:51:12
// * Creater       : CodeSmith
// * LastChangeDate: 2013-02-20 19:51:12
// * LastChanger   : 2013-02-20 19:51:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdProductTechnicItemEntity : EntityBase
    {
        public ProdProductTechnicItemTable TableSchema
        {
            get
            {
                return ProdProductTechnicItemTable.Current;
            }
        }

        public ProdProductTechnicItemEntity()
        {

        }

        public ProdProductTechnicItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ProductTechnicItemId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ITEM_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.GroupPerson = Convert.ToString(CommonFunctions.ToObject(dr["GROUP_PERSON"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.PlanStarttime = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_STARTTIME"]));
            this.PlanEndtime = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_ENDTIME"]));
            this.WorkcenterCode = Convert.ToString(CommonFunctions.ToObject(dr["WORKCENTER_CODE"]));
            this.WorkcenterName = Convert.ToString(CommonFunctions.ToObject(dr["WORKCENTER_NAME"]));
            this.WorkingTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["WORKING_TIME"]));
            this.TimeCoefficient = Convert.ToDecimal(CommonFunctions.ToObject(dr["TIME_COEFFICIENT"]));
        }

        public ProdProductTechnicItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ProductTechnicItemId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ITEM_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.GroupPerson = Convert.ToString(CommonFunctions.ToObject(dr["GROUP_PERSON"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.PlanStarttime = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_STARTTIME"]));
            this.PlanEndtime = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_ENDTIME"]));
            this.WorkcenterCode = Convert.ToString(CommonFunctions.ToObject(dr["WORKCENTER_CODE"]));
            this.WorkcenterName = Convert.ToString(CommonFunctions.ToObject(dr["WORKCENTER_NAME"]));
            this.WorkingTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["WORKING_TIME"]));
            this.TimeCoefficient = Convert.ToDecimal(CommonFunctions.ToObject(dr["TIME_COEFFICIENT"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdProductTechnicItemTable.Current;
            }
        }

        #region Perporty List
        public string ProductTechnicItemId
        {
            get { return Convert.ToString(GetData(ProdProductTechnicItemTable.C_PRODUCT_TECHNIC_ITEM_ID)); }
            set { SetData(ProdProductTechnicItemTable.C_PRODUCT_TECHNIC_ITEM_ID, value); }
        }

        public string ProductTechnicId
        {
            get { return Convert.ToString(GetData(ProdProductTechnicItemTable.C_PRODUCT_TECHNIC_ID)); }
            set { SetData(ProdProductTechnicItemTable.C_PRODUCT_TECHNIC_ID, value); }
        }

        public string GroupPerson
        {
            get { return Convert.ToString(GetData(ProdProductTechnicItemTable.C_GROUP_PERSON)); }
            set { SetData(ProdProductTechnicItemTable.C_GROUP_PERSON, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(ProdProductTechnicItemTable.C_QTY)); }
            set { SetData(ProdProductTechnicItemTable.C_QTY, value); }
        }

        public DateTime PlanStarttime
        {
            get { return Convert.ToDateTime(GetData(ProdProductTechnicItemTable.C_PLAN_STARTTIME)); }
            set { SetData(ProdProductTechnicItemTable.C_PLAN_STARTTIME, value); }
        }

        public DateTime PlanEndtime
        {
            get { return Convert.ToDateTime(GetData(ProdProductTechnicItemTable.C_PLAN_ENDTIME)); }
            set { SetData(ProdProductTechnicItemTable.C_PLAN_ENDTIME, value); }
        }

        public string WorkcenterCode
        {
            get { return Convert.ToString(GetData(ProdProductTechnicItemTable.C_WORKCENTER_CODE)); }
            set { SetData(ProdProductTechnicItemTable.C_WORKCENTER_CODE, value); }
        }

        public string WorkcenterName
        {
            get { return Convert.ToString(GetData(ProdProductTechnicItemTable.C_WORKCENTER_NAME)); }
            set { SetData(ProdProductTechnicItemTable.C_WORKCENTER_NAME, value); }
        }

        public decimal WorkingTime
        {
            get { return Convert.ToDecimal(GetData(ProdProductTechnicItemTable.C_WORKING_TIME)); }
            set { SetData(ProdProductTechnicItemTable.C_WORKING_TIME, value); }
        }

        public decimal TimeCoefficient
        {
            get { return Convert.ToDecimal(GetData(ProdProductTechnicItemTable.C_TIME_COEFFICIENT)); }
            set { SetData(ProdProductTechnicItemTable.C_TIME_COEFFICIENT, value); }
        }

        #endregion
    }


}

